Skip to content

refactor: Remove seq from TMGetObjectByHash - #6976

Merged
bthomee merged 3 commits into
developfrom
a1q123456/remove-seq-from-TMGetObjectByHash
Apr 23, 2026
Merged

refactor: Remove seq from TMGetObjectByHash#6976
bthomee merged 3 commits into
developfrom
a1q123456/remove-seq-from-TMGetObjectByHash

Conversation

@a1q123456

@a1q123456 a1q123456 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR removes the seq field from TMGetObjectByHash as it's not used and obsolete.

Context of Change

As Vinie suggested in the comment that the seq field is obsolete, we did some research and confirmed that it's indeed not used and it's safe to remove.

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

@a1q123456
a1q123456 requested review from vlntb and ximinez April 20, 2026 14:55

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave this a review

Missing reserved 3; after removing the seq field — see inline.


Review by ReviewBot 🤖

Review by Claude Opus 4.6 · Prompt: V15

Comment thread include/xrpl/proto/xrpl.proto

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the peer-protocol TMGetObjectByHash message by removing the obsolete seq field and cleaning up related code paths and tests.

Changes:

  • Remove seq (field/tag 3) from TMGetObjectByHash in xrpl.proto.
  • Stop copying seq from request to reply in PeerImp and LedgerMaster handlers.
  • Update overlay compression test to no longer set seq on TMGetObjectByHash.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/xrpld/overlay/detail/PeerImp.cpp Removes propagation of obsolete seq into TMGetObjectByHash replies and drops an outdated comment.
src/xrpld/app/ledger/detail/LedgerMaster.cpp Removes propagation of seq when constructing fetch-pack replies.
src/test/overlay/compression_test.cpp Updates test setup to stop setting removed seq field.
include/xrpl/proto/xrpl.proto Deletes the seq field from the protobuf definition of TMGetObjectByHash.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread include/xrpl/proto/xrpl.proto
Comment thread include/xrpl/proto/xrpl.proto Outdated
@a1q123456
a1q123456 requested a review from bthomee April 20, 2026 15:13

@xrplf-ai-reviewer xrplf-ai-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues.

Review by Claude Opus 4.6 · Prompt: V15

@codecov

codecov Bot commented Apr 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.6%. Comparing base (852fbe9) to head (61ce265).
⚠️ Report is 16 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #6976   +/-   ##
=======================================
  Coverage     81.6%   81.6%           
=======================================
  Files         1010    1010           
  Lines        75992   75988    -4     
  Branches      7605    7595   -10     
=======================================
+ Hits         62002   62017   +15     
+ Misses       13990   13971   -19     
Files with missing lines Coverage Δ
src/xrpld/app/ledger/detail/LedgerMaster.cpp 42.7% <ø> (+0.1%) ⬆️
src/xrpld/overlay/detail/PeerImp.cpp 5.6% <ø> (-0.1%) ⬇️

... and 4 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ximinez

ximinez commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

What is the most recent version that used this field, and is it amendment or otherwise blocked?

@a1q123456

Copy link
Copy Markdown
Contributor Author

What is the most recent version that used this field, and is it amendment or otherwise blocked?

We were doing this initially

if (!reply.has_seq() && (hObj->getIndex() != 0))
						reply.set_seq(hObj->getIndex());

And then we removed it 11 years ago in the commit f946d7b by Vinnie.

Can confirm we don't use this field in the past 11 years.

@ximinez

ximinez commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

What is the most recent version that used this field, and is it amendment or otherwise blocked?

Can confirm we don't use this field in the past 11 years.

Hahaha! Wow, yeah, that's safe to remove.

@bthomee

bthomee commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

What is the most recent version that used this field, and is it amendment or otherwise blocked?

Can confirm we don't use this field in the past 11 years.

Hahaha! Wow, yeah, that's safe to remove.

@ximinez If the rest of the code looks good, please approve so I can merge it.

@ximinez ximinez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be safe

@a1q123456
a1q123456 removed the request for review from vlntb April 22, 2026 12:41
@a1q123456 a1q123456 added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Apr 22, 2026
@bthomee
bthomee added this pull request to the merge queue Apr 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 23, 2026
@bthomee
bthomee added this pull request to the merge queue Apr 23, 2026
Merged via the queue into develop with commit 7cd5038 Apr 23, 2026
3 checks passed
@bthomee
bthomee deleted the a1q123456/remove-seq-from-TMGetObjectByHash branch April 23, 2026 14:19
marek-foss-neti pushed a commit to marek-foss-neti/rippled that referenced this pull request May 5, 2026
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants